﻿<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="Default.aspx.cs" MasterPageFile="~/Design.Master"
    Inherits="Resto55Business_WebRole.Default" Theme="Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" runat="server">
    <%--<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="TB_Town"
        ServiceMethod="GetCompletionListTown" ServicePath="AutoComplete.asmx" MinimumPrefixLength="2"
        CompletionInterval="80" EnableCaching="true" CompletionSetCount="20" CompletionListCssClass="autocomplete_completionListElement"
        CompletionListItemCssClass="autocomplete_listItem" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
        DelimiterCharacters=";, :" ShowOnlyCurrentWordInCompletionListItem="true" OnClientItemSelected="AutoSubmit" >
    </cc1:AutoCompleteExtender>--%>
    <br />
    <br />

<%--    <script type="text/javascript">
        function AutoSubmit() {
            document.getElementById('<%= BT_Search.ClientID%>').click();
        }
//        function HideText(tb) {
//            if (tb.value == "Rechercher un restaurant (ville ou nom)") {
//                tb.value = "";
//            }
//        }
    </script>
--%>
    <asp:TextBox ID="TB_Town" Text="Paris" 
        runat="server"></asp:TextBox><%--onclick="javascript:HideText(this);"--%>
    <asp:Button ID="BT_Search" runat="server" Text="Rechercher" OnClick="BT_Search_Click" />
    <%-- <asp:ListView ID="ListView1" Visible="false"  runat="server" >
     <LayoutTemplate>
     <div runat="server">
     <div runat="server" id="itemPlaceholder"/> 
     </div>
     </LayoutTemplate>
        <ItemTemplate>
        <div runat="server" >
              <asp:HyperLink ID="Label1" runat="server" Text='<%# Eval("nom") %>' 
                    NavigateUrl='<%# "Consult.aspx?id=" + Eval("UniqueId") %>' ></asp:HyperLink>
             </div>       
        </ItemTemplate>
        <ItemSeparatorTemplate>
           
        </ItemSeparatorTemplate>
        </asp:ListView>--%>
    <asp:DataList ID="DataList1" runat="server">
        <ItemTemplate>
            <asp:HyperLink ID="Label1" runat="server" Text='<%#  Eval("nom") + " à " + Eval("ville") %>'
                NavigateUrl='<%# "Consult.aspx?id=" + Eval("UniqueId") %>'></asp:HyperLink>
        </ItemTemplate>
    </asp:DataList><br />
    <asp:HyperLink ID="HL_Add" NavigateUrl="~/Create.aspx" runat="server">Ajouter un restaurant</asp:HyperLink>
    
</asp:Content>
